import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 资料明细查询
export const DetailOfData = (parms:any) => {
    return service.post<any,any>(`/personnel/PcSalaryNewList`,parms)
}

// 部门查询
export const deptNameQuery = (deptName:string) => {
    return service.get<any,any>(`/personnel/deptList?deptName=${deptName}`)
}

// 取数
export const fetchQuery = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/fetchEmployee`,parms)
}

// 取月考勤
export const TakeMonthlyAttendance = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/RetrieveAttendanceData`,parms)
}

// 检核取消检核
export const checkCancelCheck = (choose:number,map:any) => {
    return LoginWork.post<any,any>(`/personnel/CheckMonthlyAttendance/${choose}`,map)
}

// 提成比率建档
export const FilingOfRoyaltyRates = () => {
    return service.get<any,any>(`/personnel/PcSalaryRateList`)
}

// 删除提成比率建档
export const FilingDelter = (id:string) => {
    return LoginWork.post<any,any>(`/personnel/delPcSalaryRate?id=${id}`)
}

// 修改
export const FilingDelter1 = (parms:any) => {
    return LoginWork.put<any,any>(`/personnel/updatePcSalaryRate`,parms)
}

// 提成比率新增
export const addFiling = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/addPcSalaryRate`,parms)
}

// 检核月工资
export const checkMonthSalary = (choose:number,map:any) => {
    return LoginWork.post<any,any>(`/personnel/CheckMonthlySalary/${choose}`,map)
}

// 管理组别建档查询
export const ManagementGroup = () => {
    return service.get<any,any>(`/personnel/PcSalaryDeptList`)
}

export const ManagementDelter = (id:string) => {
    return LoginWork.put<any,any>(`/personnel/delPcSalaryDept?id=${id}`)
}

export const  ManagementDelter1 = (parms:any) => {
    return LoginWork.put<any,any>(`/personnel/updatePcSalaryDept`,parms)
}

// 管理组别新增
export const addManagement = (parms:any) => {
    return LoginWork.put<any,any>(`/personnel/addPcSalaryDept`,parms)
}

// 取件工资
export const PickupPay = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/PieceRateSalary`,parms)
}

// 计时工资
export const housePay = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/TakeHourlyWages`,parms)
}

// 清空资料
export const cancelDate = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/delPcSalaryNewList`,parms)
}

// 调岗明细查询
export const AssignmentDetails = (yyyymm:string,workerId:string) => {
    return service.get<any,any>(`/personnel/getPcSalaryNewDetailList?yyyymm=${yyyymm}&workerId=${workerId}`)
}

// 计算工资
export const salaryCalculator = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/CalculateSalary`,parms)
}

// 计算工资
export const GetPerformance = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/getMeritPay`,parms)
}

// 重算工资
export const RecalculationOfWages = (parms:any) => {
    return LoginWork.post<any,any>(`/personnel/RecalculateSalary`,parms)
}

// 月查询
export const RecalculationOf = () => {
    return LoginWork.get<any,any>(`/personnel/getMonth`)
}